package net.wwang.blog.controller.admin;

import net.wwang.blog.pojo.Article;
import net.wwang.blog.commons.global.ResponseResult;
import org.springframework.web.bind.annotation.*;

/**
 * @author WangWei
 * @date 2020/8/14
 */
@RestController
@RequestMapping(value = "/admin/article")
public class ArticleApi {

    @PostMapping
    public ResponseResult addArticle(@RequestBody Article article){
        return  null;
    }

    @GetMapping(value = "/{articleId}")
    public ResponseResult getArticle(@PathVariable("articleId")String articleId){
        return null;
    }

    @GetMapping(value = "/list")
    public ResponseResult gerArticleList(@RequestParam("page")int page,@RequestParam("size")int size){
        return  null;
    }

    @PutMapping(value = "/{articleId}")
    public ResponseResult updateArticle(@PathVariable("articleId")String articleId, @RequestBody Article article){
        return null;
    }

    @DeleteMapping(value = "/{articleId}")
    public ResponseResult delCategory(@PathVariable("articleId")String articleId){
        return null;
    }

    @PutMapping(value = "/top/{articleId}/{state}")
    public ResponseResult alterAticleToTop(@PathVariable("articleId")String articleId,@PathVariable("state")String state){
        return null;
    }
    @PutMapping(value = "/state/{state}")
    public ResponseResult updateArticleState(@PathVariable("state")String state){
    return null;
    }
}
